\(\int \frac {x^3}{x-x^3} \, dx\) [28]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 6 \[ \int \frac {x^3}{x-x^3} \, dx=-x+\text {arctanh}(x) \]

[Out]

-x+arctanh(x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1598, 327, 212} \[ \int \frac {x^3}{x-x^3} \, dx=\text {arctanh}(x)-x \]

[In]

Int[x^3/(x - x^3),x]

[Out]

-x + ArcTanh[x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 1598

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps \begin{align*} \text {integral}& = \int \frac {x^2}{1-x^2} \, dx \\ & = -x+\int \frac {1}{1-x^2} \, dx \\ & = -x+\tanh ^{-1}(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(22\) vs. \(2(6)=12\).

Time = 0.00 (sec) , antiderivative size = 22, normalized size of antiderivative = 3.67 \[ \int \frac {x^3}{x-x^3} \, dx=-x-\frac {1}{2} \log (1-x)+\frac {1}{2} \log (1+x) \]

[In]

Integrate[x^3/(x - x^3),x]

[Out]

-x - Log[1 - x]/2 + Log[1 + x]/2

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 2.12 (sec) , antiderivative size = 14, normalized size of antiderivative = 2.33

method result size
meijerg \(\frac {i \left (2 i x -2 i \operatorname {arctanh}\left (x \right )\right )}{2}\) \(14\)
default \(-x -\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(17\)
norman \(-x -\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(17\)
risch \(-x -\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(17\)
parallelrisch \(-x -\frac {\ln \left (-1+x \right )}{2}+\frac {\ln \left (1+x \right )}{2}\) \(17\)

[In]

int(x^3/(-x^3+x),x,method=_RETURNVERBOSE)

[Out]

1/2*I*(2*I*x-2*I*arctanh(x))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 16 vs. \(2 (6) = 12\).

Time = 0.26 (sec) , antiderivative size = 16, normalized size of antiderivative = 2.67 \[ \int \frac {x^3}{x-x^3} \, dx=-x + \frac {1}{2} \, \log \left (x + 1\right ) - \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate(x^3/(-x^3+x),x, algorithm="fricas")

[Out]

-x + 1/2*log(x + 1) - 1/2*log(x - 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 14 vs. \(2 (3) = 6\).

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 2.33 \[ \int \frac {x^3}{x-x^3} \, dx=- x - \frac {\log {\left (x - 1 \right )}}{2} + \frac {\log {\left (x + 1 \right )}}{2} \]

[In]

integrate(x**3/(-x**3+x),x)

[Out]

-x - log(x - 1)/2 + log(x + 1)/2

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 16 vs. \(2 (6) = 12\).

Time = 0.19 (sec) , antiderivative size = 16, normalized size of antiderivative = 2.67 \[ \int \frac {x^3}{x-x^3} \, dx=-x + \frac {1}{2} \, \log \left (x + 1\right ) - \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate(x^3/(-x^3+x),x, algorithm="maxima")

[Out]

-x + 1/2*log(x + 1) - 1/2*log(x - 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 18 vs. \(2 (6) = 12\).

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 3.00 \[ \int \frac {x^3}{x-x^3} \, dx=-x + \frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \]

[In]

integrate(x^3/(-x^3+x),x, algorithm="giac")

[Out]

-x + 1/2*log(abs(x + 1)) - 1/2*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.00 \[ \int \frac {x^3}{x-x^3} \, dx=\mathrm {atanh}\left (x\right )-x \]

[In]

int(x^3/(x - x^3),x)

[Out]

atanh(x) - x